<%@ page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<c:set var="contextPath"
	value="${pageContext.servletContext.contextPath}" />
<!DOCTYPE html>
<html lang="nl">
<head>
<title>Het Cultuurhuis: reservatiemandje</title>
<link rel="stylesheet" href="${contextPath}/styles/default.css" />
</head>
<body>
	<h1>Het Cultuurhuis: reservatiemandje</h1>
	<div>
		<a href="<c:url value="/welkom.htm"/>">Voorstellingen</a> <a
			href="<c:url value="/bevestigen.htm"/>">Bevestiging reservatie</a>
	</div>
	<c:url value="/verwijderen.htm" var="verwijderURL"/>
	<form method="post" action="${verwijderURL}">
		<table>
			<tr>
				<th>Datum</th>
				<th>Titel</th>
				<th>Uitvoerders</th>
				<th>Prijs Totaal</th>
				<th>Plaatsen</th>
				<th><input class="button" type="submit" value="Verwijderen"></input></th>
			</tr>
			<c:forEach var="entry" items="${mandje}" varStatus="status">
			<tr class="${status.count%2 == 0?'even':'oneven'}">
					<td><fmt:formatDate value="${entry.key.datum}" type="both" timeStyle="medium" dateStyle="short"/></td>
					<td>${entry.key.titel}</td>
					<td>${entry.key.uitvoerders}</td>
					<td>&euro;<fmt:formatNumber value="${entry.key.prijs*entry.value}" minFractionDigits="2"/></td>
					<td>${entry.value}</td>
					<td><label><input type="checkbox" name="reservatie"
							value="${entry.key.voorstellingsNr}"></input></label></td>
				</tr>
			</c:forEach>
		</table>
	</form>
</body>
</html>